package com.suishoupai.xmb.entity;

import com.alibaba.fastjson.JSONObject;

/**
 * Created by caojian on 2017/4/27.
 */
public class HuanxinMessage {
    public static final int ORDER_NEW_TYPE = 1;
    private int type;
    private String message;

    private HuanxinMessage() {
    }

    public static HuanxinMessage newMessage(int type, String message) {
        HuanxinMessage huanxinMessage = new HuanxinMessage();
        huanxinMessage.setType(type);
        huanxinMessage.setMessage(message);
        return huanxinMessage;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public String getMessage() {
        return message;
    }


    public String toJSONString() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("type", type);
        jsonObject.put("message", message);
        return jsonObject.toJSONString();
    }
}
